package com.gitee.maskit.utils;

import com.fasterxml.jackson.databind.util.StdConverter;

import java.util.Date;

public class ResponseConverter extends StdConverter<Response, Response> {
    public Response convert(Response value) {
        return null != value ?
            (null != value.getTimestamp() ? value : value.setTimestamp(new Date()))
            : Response.no();
    }
}
